<?php
/**
 * Created by PhpStorm.
 * User: zhangrxiang
 * Date: 2016/11/29
 * Time: 15:41
 */

$cURL = curl_init();
curl_setopt($cURL,CURLOPT_HEADER,"");
curl_setopt($cURL,CURLOPT_URL,"http://www.baidu.com");
curl_setopt($cURL,CURLOPT_RETURNTRANSFER,1);
curl_setopt($cURL,CURLOPT_POST,1);
curl_setopt($cURL,CURLOPT_POSTFIELDS,["username" => "hehe"]);
$result = curl_exec($cURL);
curl_close($cURL);
var_dump($result);
